const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('darkMode', {
  toggle: () => ipcRenderer.invoke('dark-mode:toggle'),
  system: () => ipcRenderer.invoke('dark-mode:system'),
})
contextBridge.exposeInMainWorld('file', {
  uploader: (file) => ipcRenderer.invoke('uploader', file),
  changeConfig: (configItem) => ipcRenderer.invoke('changeConfig', configItem),
  savaData: (requst) => ipcRenderer.invoke('savaData', requst),
  getFileInfo: (path) => ipcRenderer.invoke('savaData', path),
})